<template>
  <div id="component_tqyb">
    <iframe :width="tqybWidth" height="140" frameborder="0" scrolling="no" hspace="0" 
      src="https://i.tianqi.com/?c=code&a=getcode&id=20&bdc=%23FFFFFF&py=jinan&icon=1"></iframe>
  </div>
</template>

<script>

export default {
  data() {
    return {
      tqybWidth:400
    }
  },
  mounted (){
    window.addEventListener("resize",()=>{
      this.tqybWidth = document.querySelector("#component_tqyb").clientWidth
    })
  }
}
</script>
<style lang="scss" scoped>
#component_tqyb{
  min-height: 280px;
  padding: 20px 0;
  overflow: auto;
}
</style>